<?php

    const STR_valid_user = 'valid_user';
    
    const STR_json = 'json';
    const STR_text = 'text';
    const STR_xml = 'xml';
    const STR_object = 'object';
    const STR_boolean = 'boolean';
    const STR_array = 'array';
    const STR_number = "number";

    const
        STR_callback = 'callback';

    const
        WARNING_query_failed = 'Database queried failed. ',
        WARNING_id_notexist = 'The WeChat ID does not exist. ',
        WARNING_passwd_incorrect = 'Incorrect password. ',
        WARNING_operation_failed = 'Operation failed. ';
        
    

    const WARNING_already_friend = 'You have been already friends.';
    
    
    const WARNING_unauthorized = 'You have no authority to perform this operation.';
    
    const PATH_upfiles = "D:\\BaiduCloud\\Programs\\php5.6.6\\uploads\\";
    
    
    const STR_algo_hash_pic = 'md5';
    const STR_algo_hash_passwd = 'sha1';
    
    function datetime_now()
    {
        return date("Y-m-d H:i:s");
    }
    

    function warning_parameter_needed($para)
    {
        return "Parameter '".$para."' is needed.";
    }
    
    function warning_parameter_invalid($para, $value_now)
    {
        return "Invalid value of parameter '".$para."': '".$value_now."'.";        
    }
    
    function warning_id_notexist($id)
    {
        return "The WeChat ID does not exist: '".$id."'.";
    }
    
    
    function from_utf8_to_gb2312($input)
    {
        return iconv('utf-8', 'gb2312', $input);
    }
    

?>